
<template>
  <div class="main">
    <div class="bgImg">
      <img :src="props.playList.coverImgUrl" alt="" />
    </div>
    <div class="top">
      <div class="topLeft">
        <svg class="icon" aria-hidden="true" @click="$router.go(-1)">
          <use xlink:href="#icon-zuojiantou"></use>
        </svg>
        <span>歌单</span>
      </div>
      <div class="topRight">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-sousuo"></use>
        </svg>
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-daohang"></use>
        </svg>
      </div>
    </div>
    <div class="center">
      <div class="centerLeft">
        <img :src="props.playList.coverImgUrl" alt="" />
      </div>
      <div class="centerRight">
        <p class="authorTop">{{ playList.name }}</p>
        <p class="authorCenter">
          <img :src="props.creator.backgroundUrl" alt="" />
          <span>{{ props.creator.nickname }}</span>
        </p>
        <p class="authorBottom">
          {{ props.playList.description }}
        </p>
        <div class="description"></div>
      </div>
    </div>
    <div class="bottom">
      <div class="bottomItem">
        <svg class="icon" aria-hidden="true" @click="backHome">
          <use xlink:href="#icon-liuyan"></use>
        </svg>
        <p>{{ props.playList.shareCount }}</p>
      </div>
      <div class="bottomItem">
        <svg class="icon" aria-hidden="true" @click="backHome">
          <use xlink:href="#icon-fenxiang"></use>
        </svg>
        <p>{{ props.playList.commentCount }}</p>
      </div>
      <div class="bottomItem">
        <svg class="icon" aria-hidden="true" @click="backHome">
          <use xlink:href="#icon-iconfontzhizuobiaozhun023146"></use>
        </svg>
        <p>下载</p>
      </div>
      <div class="bottomItem">
        <svg class="icon" aria-hidden="true" @click="backHome">
          <use xlink:href="#icon-xuanze-duoxuan-tianchong"></use>
        </svg>
        <p>多选</p>
      </div>
    </div>
  </div>
</template>
<script setup>
const props = defineProps(['creator', 'playList'])
console.log(props)
</script>
<style lang='scss' scoped>
.main {
  position: relative;
  padding: 0.2rem;
  background-color: rgba(145, 153, 161, 0.2);
  .icon {
    fill: #fff;
  }
}
.bgImg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  filter: blur(30px);
  img {
    width: 100%;
    height: 6rem;
  }
}
.top {
  display: flex;
  height: 1rem;
  color: #fff;
  justify-content: space-between;
  align-items: center;
  .topLeft {
    display: flex;
    align-items: center;
    .icon {
      margin-right: 0.4rem;
    }
    span {
      font-size: 0.36rem;
    }
  }
  .topRight {
    display: flex;
    width: 2rem;
    justify-content: space-between;
  }
}
.center {
  display: flex;
  height: 4rem;
  overflow: hidden;
  .centerLeft {
    width: 3rem;
    height: 3rem;
    img {
      width: 100%;
      height: 100%;
      border-radius: 0.6rem;
    }
  }
  .centerRight {
    color: #fff;
    height: 4rem;
    flex: 1;
    padding: 0.15rem;
    .authorTop {
      font-size: 0.36rem;
    }
    .authorCenter {
      display: flex;
      align-items: center;
      padding: 0.16rem;
      img {
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 50%;
        margin-right: 0.1rem;
      }
    }
    .authorBottom {
      height: 2.4rem;
      word-wrap: break-word; /*强制换行*/
      overflow: hidden; /*超出隐藏*/
      text-overflow: ellipsis; /*隐藏后添加省略号*/
    }
  }
}
.bottom {
  display: flex;
  height: 1rem;
  justify-content: space-around;
  align-items: center;
  color: #fff;
}
</style>
